<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>组件</title>
    <link rel="stylesheet" type="text/css" href="../../easyui/themes/default/easyui.css"/>
    <link rel="stylesheet" type="text/css" href="../../easyui/themes/icon.css"/>
    <link rel="stylesheet" type="text/css" href="../design.css"/>

    <script type="text/javascript" src="../../jquery/jquery.min.js"></script>
    <script type="text/javascript" src="../../jquery/env.js"></script>

    <script type="text/javascript" src="../../easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../plugins/readjdbc.js"></script>
<style>
    .unit-footer{
        width: 260px;
        height: 36px;
        position: relative;
        margin: 2px auto 10px;
    }
    .unit-footer-item{
        position: absolute;
    }


</style>
</head>
<body>
<a class="easyui-linkbutton" href="#" data-options="iconCls:'icon-add'" onclick="test()">组件编辑</a>
<div id="win"></div>

<div id="ff" class="unit-footer" hidden>
    <div class="unit-footer-item" style="left: 30px">
        <a href="#" class="easyui-linkbutton" data-options="width:60">确定</a>
    </div>
    <div class="unit-footer-item" style="left: 100px">
        <a href="#" class="easyui-linkbutton" data-options="width:60">预览</a>
    </div>
    <div class="unit-footer-item" style="left: 170px">
        <a href="#" class="easyui-linkbutton" data-options="width:60">取消</a>
    </div>


</div>


</body>
<script>
    function test() {
        var win = $('<div><div>')
            .appendTo('body')
            .readjdbc({stepId:'stepId',unitType:'READ_JDBC',describe:'表输入'})
    }

    function edit(step) {
        $('#win').window({
            title: step.describe,
            width: 800,
            height: 500,
            footer: '#ff',
            onOpen:function () {
                let win = this;
                $.getJSON('../test/readJdbc.json',function (data) {
                    if('READ_JDBC'==step.unitType){
                        editReadJdbc(win,data)
                    }

                });
            }
        });
    }

    function editReadJdbc(e,readJdbc) {
        console.log(e,readJdbc);

    }


</script>
</html>
